home *** CD-ROM | disk | FTP | other *** search
Wrap
#ifndef GALLERYWINDOW_HPP #define GALLERYWINDOW_HPP // $VER: GalleryWindow.hpp 39.8 (10.06.97) // // // (C) Copyright 1996,97 Markus Hillenbrand // All Rights Reserved, No Warranty #include "GUICINCLUDE:GUIC_Window.hpp" #include "GUICINCLUDE:GUIC_List.hpp" #include "GUICINCLUDE:GUIC_Screenrequester.hpp" class GUIC_ButtonC; class GUIC_RegisterC; class GUIC_FileStringC; class GUIC_FileExamineC; class GUIC_PathStringC; class GUIC_SlidingIntegerC; class GUIC_CheckboxC; class GUIC_IntegerC; class GUIC_LabelC; class GUIC_StringC; class GUIC_ScreenC; class GUIC_ApplicationC; class GUIC_TextC; class GUIC_FrameC; class GUIC_RadioC; class GUIC_CycleC; class StatusWindowC; class ManagerWindowC; class PictureWindowC; class ThumbnailWindowC; // Defines #define MINLINES 3 #define MINCOLUMNS 3 #define MAXLINES 200 #define MAXCOLUMNS 200 #define DEFAULTLINES 3 #define DEFAULTCOLUMNS 5 #define MENUFRAMEWIDTH 150 #define MINTHUMBNAILWIDTH 50 #define MINTHUMBNAILHEIGHT 50 #define MAXTHUMBNAILWIDTH 200 #define MAXTHUMBNAILHEIGHT 200 #define DEFTHUMBNAILWIDTH 100 #define DEFTHUMBNAILHEIGHT 100 #define MINTABLEBORDERSIZE 0 #define MAXTABLEBORDERSIZE 20 #define DEFTABLEBORDERSIZE 4 #define COPYRIGHT "<SMALL> index file created with 'Gallery', (c) 1997 by <A HREF=\"http://www.student.uni-kl.de/~hillenbr\" TARGET=_top>Markus Hillenbrand</A> </SMALL>" #define FILEFILTER "#?.(jpeg|jpg|gif|iff|ilbm|iff24|bmp|pcx|tiff)" #define COMMAND "C:GfxCon_68020 >CON:0/999/640/150/Gallery-Output/AUTO/INACTIVE \"%s\" TO \"%s\" FORMAT JPEG QUALITY 90 BOXFIT %ld %ld" class GalleryWindowC : public GUIC_WindowC { public: GalleryWindowC (GUIC_ApplicationC &app, GUIC_ScreenC &screen); ~GalleryWindowC (VOID); BOOL action (GUIC_EventC &event); STRPTR getClass (VOID); protected: ULONG scanDirectory (STRPTR dir, STRPTR pattern, STRPTR pattern2, BOOL allFiles); VOID generateGallery (VOID); STRING makeThumbnail (GUIC_FileExamineC &file, LONG thumbnailWidth, LONG thumbnailHeight, BOOL useGGFX); VOID createGallery (GUIC_ListC &fileList, STRPTR pattern, STRPTR pattern2, LONG linesInTable, LONG columnsInTable, BOOL picClick, BOOL showSize, BOOL showDate, LONG menuFrameWidth, LONG thumbnailWidth, LONG thumbnailHeight, LONG tableBorderSize, STRPTR baseName, BOOL noFrames); VOID createHTML (GUIC_ListC &fileList, STRPTR pattern, BOOL showDate, LONG tableBorderSize, STRPTR baseName, BOOL noFrames); VOID cleanUp (VOID); private: GUIC_ButtonC *start, *quit, *manager, *screenButton; GUIC_RegisterC *reg; GUIC_FileStringC *pattern, *pattern2; GUIC_PathStringC *directory; GUIC_SlidingIntegerC *lines, *columns, *width, *height, *tableBorder; GUIC_CheckboxC *click, *size, *date, *noFrames, *createAll, *useGGFX, *hideFlag; GUIC_IntegerC *frame; GUIC_LabelC *dirLabel, *patternLabel, *pattern2Label, *linesLabel, *columnsLabel, *clickLabel, *sizeLabel, *dateLabel, *frameLabel, *widthLabel, *heightLabel, *tableBorderLabel, *baseNameLabel, *noFramesLabel, *createAllLabel, *programLabel, *useGGFXLabel, *hideLabel; GUIC_StringC *baseName, *program, *pubscreen; GUIC_ScreenC *screen; GUIC_ApplicationC *app; GUIC_ListC fileList, errorList; GUIC_ScreenRequesterC screenRequester; GUIC_TextC *screenName, *screenDims, *fontName; GUIC_FrameC *screenFrame; GUIC_RadioC *pubOrOwn; StatusWindowC *sWindow; ManagerWindowC *mWindow; PictureWindowC *pWindow; ThumbnailWindowC *tWindow; LONG totalFiles, actualFiles; char sName[256], sDimensions[256], fName[256]; }; #endif